/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package net.maixiami;

import com.sleepycat.persist.model.Entity;
import com.sleepycat.persist.model.PrimaryKey;
import com.sleepycat.persist.model.Relationship;
import com.sleepycat.persist.model.SecondaryKey;
import com.taobao.api.domain.TaobaokeItem;

/**
 *
 * @author 叶勤勇
 */
@Entity
public class TaobaokeItemEntity {
    @PrimaryKey
    private Long num_iid;
    @SecondaryKey(relate=Relationship.MANY_TO_ONE)
    private String nick;
    
    private Long cid;
    private String title;    
    private String pic_url;
    private String price;
    private String click_url;
    private String commission;
    private String commission_rate;
    private String commission_num;
    private String commission_volume;
    private String shop_click_url;
    private Long seller_credit_score;
    private String item_location;
    private Long volume;

    public TaobaokeItemEntity() {}
    
    public TaobaokeItemEntity(TaobaokeItem item, Long cid) {
        this.num_iid = item.getNumIid();
        this.nick = item.getNick();
        this.title = item.getTitle();
        this.pic_url = item.getPicUrl();
        this.price = item.getPrice();
        this.click_url = item.getClickUrl();
        this.commission = item.getCommission();
        this.commission_num = item.getCommissionNum();
        this.commission_rate = item.getCommissionRate();
        this.commission_volume = item.getCommissionVolume();
        this.shop_click_url = item.getShopClickUrl();
        this.seller_credit_score = item.getSellerCreditScore();
        this.item_location = item.getItemLocation();
        this.volume = item.getVolume();
        this.cid = cid;
    }
    
    public String getClick_url() {
        return click_url;
    }

    public void setClick_url(String click_url) {
        this.click_url = click_url;
    }

    public String getCommission() {
        return commission;
    }

    public void setCommission(String commission) {
        this.commission = commission;
    }

    public String getCommission_num() {
        return commission_num;
    }

    public void setCommission_num(String commission_num) {
        this.commission_num = commission_num;
    }

    public String getCommission_rate() {
        return commission_rate;
    }

    public void setCommission_rate(String commission_rate) {
        this.commission_rate = commission_rate;
    }

    public String getCommission_volume() {
        return commission_volume;
    }

    public void setCommission_volume(String commission_volume) {
        this.commission_volume = commission_volume;
    }

    public String getItem_location() {
        return item_location;
    }

    public void setItem_location(String item_location) {
        this.item_location = item_location;
    }

    public String getNick() {
        return nick;
    }

    public void setNick(String nick) {
        this.nick = nick;
    }

    public Long getNum_iid() {
        return num_iid;
    }

    public void setNum_iid(Long num_iid) {
        this.num_iid = num_iid;
    }

    public String getPic_url() {
        return pic_url;
    }

    public void setPic_url(String pic_url) {
        this.pic_url = pic_url;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public Long getSeller_credit_score() {
        return seller_credit_score;
    }

    public void setSeller_credit_score(Long seller_credit_score) {
        this.seller_credit_score = seller_credit_score;
    }

    public String getShop_click_url() {
        return shop_click_url;
    }

    public void setShop_click_url(String shop_click_url) {
        this.shop_click_url = shop_click_url;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Long getVolume() {
        return volume;
    }

    public void setVolume(Long volume) {
        this.volume = volume;
    }

    public Long getCid() {
        return cid;
    }

    public void setCid(Long cid) {
        this.cid = cid;
    }
    
    
}
